package com.tanglongan.designPattern.dp16_mediator.demo01;

public class User {
    private String name;
    private ChatRoom chatRoom;

    public User(String name, ChatRoom chatRoom) {
        this.name = name;
        this.chatRoom = chatRoom;
    }

    public void sendMessage(String msg) {
        this.chatRoom.sendMsg(this, msg);
    }

    public String getName() {
        return this.name;
    }
}
